FROM          docker.io/debian:latest  
MAINTAINER    root   <root.db.root@gmail.com>

RUN     apt-get  update  -y
RUN     apt-get  install -y openjdk-7-jre-headless


RUN     cp  /usr/share/zoneinfo/Asia/Shanghai   /etc/localtime
RUN     mkdir -p /var/log/supervisor

ADD supervisord.conf /etc/supervisor/supervisord.conf

ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64

WORKDIR /opt

RUN     wget  http://archive.apache.org/dist/activemq/5.12.1/apache-activemq-5.12.1-bin.tar.gz 
RUN     tar   xf  apache-activemq-5.12.1-bin.tar.gz
RUN     mv    /opt/apache-activemq-5.12.1    /opt/amq

WORKDIR /opt/amq/bin
RUN    mv   activemq  activemq.bak
ADD    activemq   /opt/amq/bin/activemq



RUN PATH="/opt/amq/bin:$PATH"

RUN    export  PATH


WORKDIR  /opt/amq



EXPOSE 61616 8161 22 

CMD ["/usr/bin/supervisord"]
